import {
    doExec
} from '@/api/request'

const apiPrefix = window.apiPrefix;

export const api = {
    // 系统管理员
    manage: {
        // 登录
        login(opts) {
            return doExec(`${apiPrefix}login`, opts);
        },
        out(opts) {
            return doExec(`${apiPrefix}out`, opts);
        }
    },
    // 排班
    paiban: {
        // 首页

        //选择单位
        unit(opts) {
            return doExec(`${apiPrefix}api/urgent/unit`, opts, null, 'get');
        },
        //选择部门
        dept(opts) {
            return doExec(`${apiPrefix}api/urgent/dept`, opts, null, 'get');
        },
        //选择责任人
        persons(opts) {
            return doExec(`${apiPrefix}api/urgent/persons`, opts, null, 'get');
        },
        //新建值班岗位
        newUrgent(opts) {
            return doExec(`${apiPrefix}api/urgent/newUrgent`, opts, 'JSON');
        },
        //判断新建岗位是否已存在
        isUrgentName(opts) {
            return doExec(`${apiPrefix}api/urgent/isUrgentName`, opts, null, 'get');
        },
        //获取当前值班列表
        index(opts) {
            return doExec(`${apiPrefix}api/urgent/index`, opts, null, 'get');
        },
        //选择岗位
        plans(opts) {
            return doExec(`${apiPrefix}api/urgent/plans`, opts, null, 'get');
        },
        //值班岗位管理列表
        planList(opts) {
            return doExec(`${apiPrefix}api/urgent/planList`, opts, null, 'get');
        },
        //根据时间获取岗位值班列表
        timeList(opts) {
            return doExec(`${apiPrefix}api/urgent/timeList`, opts, null, 'get');
        },
        //新建值班岗位 排班
        newDayUrgent(opts) {
            return doExec(`${apiPrefix}api/urgent/newDayUrgent`, opts, 'JSON');
        },
        //查看岗位
        planId(opts) {
            return doExec(`${apiPrefix}api/urgent/planId`, opts, null, 'get');
        },
        //修改岗位
        updateUrgent(opts) {
            return doExec(`${apiPrefix}api/urgent/updateUrgent`, opts, 'JSON');
        },
        //值班安排查询
        planByTimeList(opts) {
            return doExec(`${apiPrefix}api/urgent/planByTimeList`, opts, null, 'get');
        },
        //批量删除
        removeBatch(opts) {
            return doExec(`${apiPrefix}api/urgent/removeBatch`, opts, null, 'get');
        },
    },
    safe: {
        //检查项目
        items(opts) {
            return doExec(`${apiPrefix}api/safe/items`, opts, null, 'get');
        },
        //选择片区
        selArea(opts) {
            return doExec(`${apiPrefix}api/safe/selArea`, opts, null, 'get');
        },
        //选择点位
        selSite(opts) {
            return doExec(`${apiPrefix}api/safe/selSite`, opts, null, 'get');
        },
        //处理时限
        limites(opts) {
            return doExec(`${apiPrefix}api/safe/limites`, opts, null, 'get');
        },
        //发现隐患
        addSafe(opts) {
            return doExec(`${apiPrefix}api/safe/addSafe`, opts);
        },
        //选择部门
        selDept(opts) {
            return doExec(`${apiPrefix}api/safe/selDept`, opts, null, 'get');
        },
        //选择责任人
        selPerson(opts) {
            return doExec(`${apiPrefix}api/safe/selPerson`, opts, null, 'get');
        },
        //图片上传
        uploadFile(opts) {
            return doExec(`${apiPrefix}api/safe/uploadFile`, opts);
        },
        //查询隐患列表
        selSafe(opts) {
            return doExec(`${apiPrefix}api/safe/selSafe`, opts, null, 'get');
        },
        //统计分析表
        statistical(opts) {
            return doExec(`${apiPrefix}api/safe/statistical`, opts, null, 'get');
        },
        //查看隐患
        selSafeId(opts) {
            return doExec(`${apiPrefix}api/safe/selSafeId`, opts, null, 'get');
        },
        //整改隐患
        addChange(opts) {
            return doExec(`${apiPrefix}api/safe/addChange`, opts);
        },
        //审核隐患
        addAuding(opts) {
            return doExec(`${apiPrefix}api/safe/addAuding`, opts);
        },
        outtime(opts) {
            return doExec(`${apiPrefix}api/safe/selSafe/outtime`, opts, null, 'get');
        },
        //安全会议列表
        selMeet(opts) {
            return doExec(`${apiPrefix}api/safe/selMeet`, opts, null, 'get');
        },
        //安全会议上传
        addMeeting(opts) {
            return doExec(`${apiPrefix}api/safe/addSafe/meeting`, opts);
        },
        //会议文件上传
        meetingFile(opts) {
            return doExec(`${apiPrefix}api/safe/meeting/uploadFile`, opts, 'formdata');
        },
        //安全培训文件上传
        trainFile(opts) {
            return doExec(`${apiPrefix}api/safe/train/uploadFile`, opts, 'formdata');
        },
        //安全培训文件上传
        drillFile(opts) {
            return doExec(`${apiPrefix}api/safe/drill/uploadFile`, opts, 'formdata');
        },
        //批量删除安全会议
        removeBatchmeet(opts) {
            return doExec(`${apiPrefix}api/safe/meet/removeBatch`, opts, null, 'get');
        },
        //安全培训列表
        selTrain(opts) {
            return doExec(`${apiPrefix}api/safe/selTrain`, opts, null, 'get');
        },
        //安全培训上传
        addTrain(opts) {
            return doExec(`${apiPrefix}api/safe/addSafe/train`, opts);
        },
        //批量删除安全培训
        removeBatchtrain(opts) {
            return doExec(`${apiPrefix}api/safe/train/removeBatch`, opts, null, 'get');
        },
        //安全演练列表
        selDrill(opts) {
            return doExec(`${apiPrefix}api/safe/selDrill`, opts, null, 'get');
        },
        //安全演练上传
        addDrill(opts) {
            return doExec(`${apiPrefix}api/safe/addSafe/drill`, opts);
        },
        //批量删除安全演练
        removeBatchdrill(opts) {
            return doExec(`${apiPrefix}api/safe/drill/removeBatch`, opts, null, 'get');
        },
        //系统列表
        sys(opts) {
            return doExec(`${apiPrefix}api/safe/sys`, opts, null, 'get');
        },
        //排水点位
        sitePs(opts) {
            return doExec(`${apiPrefix}api/safe/sitePs`, opts, null, 'get');
        },
        //污水点位
        siteWs(opts) {
            return doExec(`${apiPrefix}api/safe/siteWs`, opts, null, 'get');
        },
        //部门负责人
        deptpeople(opts) {
            return doExec(`${apiPrefix}api/safe/deptpeople`, opts, null, 'get');
        },
        //安全员
        safepeople(opts) {
            return doExec(`${apiPrefix}api/safe/safepeople`, opts, null, 'get');
        },
    },
    zhunbei: {
        //添加应急通信录
        addAddRess(opts) {
            return doExec(`${apiPrefix}api/ready/addAddRess`, opts);
        },
        //应急通讯录列表
        addRessList(opts) {
            return doExec(`${apiPrefix}api/ready/addRessList`, opts);
        },
        //查看应急通讯录详情
        addRessDetail(opts) {
            return doExec(`${apiPrefix}api/ready/addRessDetail`, opts);
        },
        //修改应急通讯录
        upAddRess(opts) {
            return doExec(`${apiPrefix}api/ready/upAddRess`, opts);
        },
        //删除安全通讯录
        delAddRess(opts) {
            return doExec(`${apiPrefix}api/ready/delAddRess`, opts);
        },

        //部门列表
        deptlist(opts) {
            return doExec(`${apiPrefix}api/ready/deptlist`, opts);
        },
        //部门下的人员列表
        personlist(opts) {
            return doExec(`${apiPrefix}api/ready/personlist`, opts);
        },
        //应急物资添加
        addGoods(opts) {
            return doExec(`${apiPrefix}api/ready/addGoods`, opts);
        },
        //应急物资列表
        goodsList(opts) {
            return doExec(`${apiPrefix}api/ready/goodsList`, opts);
        },
        //应急物资详情
        goodsDetail(opts) {
            return doExec(`${apiPrefix}api/ready/goodsDetail`, opts);
        },
        //修改应急物资
        upGoods(opts) {
            return doExec(`${apiPrefix}api/ready/upGoods`, opts);
        },
        //删除应急物资
        delGoods(opts) {
            return doExec(`${apiPrefix}api/ready/delGoods`, opts);
        },
        //应急设施添加
        addInstall(opts) {
            return doExec(`${apiPrefix}api/ready/addInstall`, opts);
        },
        //应急设施列表
        installList(opts) {
            return doExec(`${apiPrefix}api/ready/installList`, opts);
        },
        //应急设施详情
        installDetail(opts) {
            return doExec(`${apiPrefix}api/ready/installDetail`, opts);
        },
        //应急设施修改
        upInstall(opts) {
            return doExec(`${apiPrefix}api/ready/upInstall`, opts);
        },
        //应急设施删除
        delInstall(opts) {
            return doExec(`${apiPrefix}api/ready/delInstall`, opts);
        },
        //应急危险源类型列表
        hazardTypes(opts) {
            return doExec(`${apiPrefix}api/ready/hazardTypes`, opts);
        },
        //危险源列表
        hazardList(opts) {
            return doExec(`${apiPrefix}api/ready/hazardList`, opts);
        },
        //危险源添加
        addHazard(opts) {
            return doExec(`${apiPrefix}api/ready/addHazard`, opts);
        },
        //危险源详情
        hazardDetail(opts) {
            return doExec(`${apiPrefix}api/ready/hazardDetail`, opts);
        },
        //危险源修改
        upHazard(opts) {
            return doExec(`${apiPrefix}api/ready/upHazard`, opts);
        },
        //危险源删除
        delHazard(opts) {
            return doExec(`${apiPrefix}api/ready/delHazard`, opts);
        },

        //预案类型列表
        planTypes(opts) {
            return doExec(`${apiPrefix}api/ready/planTypes`, opts);
        },
        //预案分类列表
        playClassifys(opts) {
            return doExec(`${apiPrefix}api/ready/playClassifys`, opts);
        },
        //添加预案
        addPlan(opts) {
            return doExec(`${apiPrefix}api/ready/addPlan`, opts);
        },
        //预案列表
        planList(opts) {
            return doExec(`${apiPrefix}api/ready/planList`, opts);
        },
        //预案详情
        planDetail(opts) {
            return doExec(`${apiPrefix}api/ready/planDetail`, opts);
        },
        //预案删除
        delPlan(opts) {
            return doExec(`${apiPrefix}api/ready/delPlan`, opts);
        },

    },
    shihou: {
        //事后评价列表
        afterList(opts) {
            return doExec(`${apiPrefix}api/ready/afterList`, opts);
        },
        //事后评价详情
        afterDetail(opts) {
            return doExec(`${apiPrefix}api/ready/afterDetail`, opts);
        },
        //添加评价
        addCallback(opts) {
            return doExec(`${apiPrefix}api/ready/addCallback`, opts);
        },
    }

}